<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>GET</title>

</head>
<body>
    <script>

        var xhr = new XMLHttpRequest();
        /*get请求需要在url后面拼接参数，使用 GET 请求附带 query参数来查询数据 */
        xhr.open("GET", "http://localhost:63342/get?mk=慕课网");

        xhr.send();

        xhr.onreadystatechange = function () {
            if (xhr.status == 200 && xhr.readyState == 4)
                console.log(xhr.responseText);
        }
    </script>
</body>
</html>